import request from '@/utils/request'
// 获取全部数据
export function getallrloedata(params) {
  return request.get('/users', { params })
}
// 获取所有数量
export function getallnumber() {
  return request.get('/users/count')
}
// 新增员工
export function Addformdata(data) {
  return request.post('/auth/local/register', data)
}
// 删除数据
export function removeformdata(id) {
  return request.delete(`/users/${id}`)
}
export function getassignformdata(id) {
  return request.get(`/users/${id}`)
}
// 编辑用户
export function alterformdata(data) {
  return request.put(`/users/${data.id}`, data)
}
// 获取所有角色
export function getallrole() {
  return request.get(`/roles`)
}
// 根据id获取指定角色
export function getIDrole(id) {
  return request.get(`/roles/${id}`)
}
